<!doctype html>

<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>dragdropgroup.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
  </script>

  <script src="static/js/doc.js">
  </script>

  <meta charset="utf8">
</head>

<body onload="prettyPrint()">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>

<div class="clear"></div>

<h2><a href="closure_goog_fx_dragdropgroup.js.html">dragdropgroup.js</a></h2>

<pre class="prettyprint lang-js">
<a name="line1"></a>// Copyright 2009 Google Inc.
<a name="line2"></a>//
<a name="line3"></a>// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
<a name="line4"></a>// you may not use this file except in compliance with the License.
<a name="line5"></a>// You may obtain a copy of the License at
<a name="line6"></a>//
<a name="line7"></a>//     http://www.apache.org/licenses/LICENSE-2.0
<a name="line8"></a>//
<a name="line9"></a>// Unless required by applicable law or agreed to in writing, software
<a name="line10"></a>// distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
<a name="line11"></a>// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<a name="line12"></a>// See the License for the specific language governing permissions and
<a name="line13"></a>// limitations under the License.
<a name="line14"></a>
<a name="line15"></a>// Copyright (C)2006 Google, Inc.
<a name="line16"></a>
<a name="line17"></a>/**
<a name="line18"></a> * @fileoverview Multiple Element Drag and Drop.
<a name="line19"></a> *
<a name="line20"></a> * Drag and drop implementation for sources/targets consisting of multiple
<a name="line21"></a> * elements.
<a name="line22"></a> *
<a name="line23"></a> * @see ../demos/dragdrop.html
<a name="line24"></a> */
<a name="line25"></a>
<a name="line26"></a>goog.provide(&#39;goog.fx.DragDropGroup&#39;);
<a name="line27"></a>
<a name="line28"></a>goog.require(&#39;goog.fx.AbstractDragDrop&#39;);
<a name="line29"></a>goog.require(&#39;goog.fx.DragDropItem&#39;);
<a name="line30"></a>
<a name="line31"></a>/**
<a name="line32"></a> * Drag/drop implementation for creating drag sources/drop targets consisting of
<a name="line33"></a> * multiple HTML Elements (items). All items share the same drop target(s) but
<a name="line34"></a> * can be dragged individually.
<a name="line35"></a> *
<a name="line36"></a> * @extends {goog.fx.AbstractDragDrop}
<a name="line37"></a> * @constructor
<a name="line38"></a> */
<a name="line39"></a>goog.fx.DragDropGroup = function() {
<a name="line40"></a>  goog.fx.AbstractDragDrop.call(this);
<a name="line41"></a>};
<a name="line42"></a>goog.inherits(goog.fx.DragDropGroup, goog.fx.AbstractDragDrop);
<a name="line43"></a>
<a name="line44"></a>
<a name="line45"></a>/**
<a name="line46"></a> * Add item to drag object.
<a name="line47"></a> *
<a name="line48"></a> * @param {Element|string} element Dom Node, or string representation of node
<a name="line49"></a> *     id, to be used as drag source/drop target.
<a name="line50"></a> * @param {Object} opt_data Data associated with the source/target.
<a name="line51"></a> * @throws Error If no element argument is provided or if the type is
<a name="line52"></a> *     invalid
<a name="line53"></a> */
<a name="line54"></a>goog.fx.DragDropGroup.prototype.addItem = function(element, opt_data) {
<a name="line55"></a>  var item = new goog.fx.DragDropItem(element, opt_data);
<a name="line56"></a>  this.addDragDropItem(item);
<a name="line57"></a>};
<a name="line58"></a>
<a name="line59"></a>
<a name="line60"></a>/**
<a name="line61"></a> * Add DragDropItem to drag object.
<a name="line62"></a> *
<a name="line63"></a> * @param {goog.fx.DragDropItem} item DragDropItem being added to the
<a name="line64"></a> *     drag object.
<a name="line65"></a> * @throws Error If no element argument is provided or if the type is
<a name="line66"></a> *     invalid
<a name="line67"></a> */
<a name="line68"></a>goog.fx.DragDropGroup.prototype.addDragDropItem = function(item) {
<a name="line69"></a>  item.parent_ = this;
<a name="line70"></a>  this.items_.push(item);
<a name="line71"></a>  if (this.isInitialized()) {
<a name="line72"></a>    this.initItem(item);
<a name="line73"></a>  }
<a name="line74"></a>};
<a name="line75"></a>
<a name="line76"></a>
<a name="line77"></a>/**
<a name="line78"></a> * Marks the supplied list of items as selected. A drag operation for any of the
<a name="line79"></a> * selected items will affect all of them.
<a name="line80"></a> *
<a name="line81"></a> * @param {Array.&lt;goog.fx.DragDropItem&gt;} list List of items to select or null to
<a name="line82"></a> *     clear selection.
<a name="line83"></a> *
<a name="line84"></a> * TODO: Not yet implemented.
<a name="line85"></a> */
<a name="line86"></a>goog.fx.DragDropGroup.prototype.setSelection = function(list) {
<a name="line87"></a>
<a name="line88"></a>};
</pre>


</body>
</html>
